package com.zhaoyu.user.controller;

import com.zhaoyu.apis.user.ApUserFollowControllerApi;
import com.zhaoyu.model.common.dtos.ResponseResult;
import com.zhaoyu.model.user.dtos.UserRelationDto;
import com.zhaoyu.user.service.ApUserFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
public class ApUserFollowController implements ApUserFollowControllerApi {

    @Autowired
    private ApUserFollowService apUserFollowService;

    @Override
    @PostMapping("/follow") // json格式的数据
    public ResponseResult followApUserFollow(@RequestBody UserRelationDto userRelationDto) {
        return apUserFollowService.follow(userRelationDto);
    }

}